package com.example.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.pojo.productDataCheckListPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface productDataCheckListMapp {

    ////查询AI品质门检测数据的数据表中的所有内容
    @DS("newMscLowCodeFormal")
    @Select("select * from ddm_product_check_list WHERE sys_deleted=0  ORDER BY create_time DESC ")
    List<productDataCheckListPojo> queryAll();


    //查询指定条件的数据,根据筛选的日期值进行筛选数据并返回
    @DS("newMscLowCodeFormal")
    @Select("select * from ddm_product_check_list where sys_deleted=0 " +
            "and ${fieldName}>=#{minVal} and ${fieldName}<=#{maxVal} order by ${fieldName} desc " )
    List<productDataCheckListPojo> queryByTimeScope(String fieldName, LocalDateTime minVal, LocalDateTime maxVal);



}
